local Systems=require("system")
local Entities=require("entity")
local ComponentManager=require("componentManager")
local world={
    Components={},
    Entities={},
    Systems={}
}
function world:new(o)--world基类的构造函数
    o=o or {}
    self.__index=self
    setmetatable(o, self)
    return o
end
function compare_system(sys1,sys2)
    return sys1.priority<sys2.priority
end
function world:init()
    self.Systems=Systems
    self.Entities=Entities
    ------------------
    --将各个Systems按照Priority进行排序
    table.sort(Systems,compare_system)
    --其他逻辑       --
    ------------------
end

function world:update()
    for sys in self.Systems do--遍历所有system
        -- statements
        print("do something in world")
    end
end

return world